<?php
declare (strict_types = 1);

namespace app\api\controller;
use app\model\CategoryModel;
use app\model\CourseMenusModel;
use app\model\MenusModel;
use think\App;

class CourseMenus extends Base {

    private $courseMenusModel;

    private $req;

    private $page;

    private $limit = 20;


    public function __construct(App $app)
    {
        parent::__construct($app);

        $this->req = request()->param();

        $this->page = isset($this->req['page']) ? $this->req['page']  : 1;

        $this->courseMenusModel = new CourseMenusModel();
    }



    public function getList()
    {
        $list = $this->courseMenusModel->getList([],$this->page,$this->limit);

        $total = $this->courseMenusModel->getTotal();

        return $this->succData($total,$list);
    }


}
